public class Test {
    {
        ListNode cur=findPrvKey(key);
        if(cur==null){
            System.out.println();
            return;
        }{
            ListNode del=cur.next;
        cur.next=del.naex;;
    }
    }
    private ListNode findPrvKey (int key){
        ListNode cur=head;
        while(cur.next!=null){
            if(cur.next.val==key){
                return cur;
            }else{
                cur=cur.next;
            }
        }
        return null;
    }
    public static void main(String[] args) {

    }
}
